import mysql, { RowDataPacket } from 'mysql2/promise'

mysql.createConnection({
    host: '192.168.56.101',
    port: 3306,
    database: 'test',
    user: 'root',
    password: 'root',
    multipleStatements: true

})
    .then(conn => conn.query<RowDataPacket[]>('select 1'))
    .then(([rows, fields]) => {
        console.log(rows);
        console.log(fields);

    }).catch(err => {
        console.log(err);
    })
